package jp.co.sn.mml.pojo.tmkstkptsrk;

import jp.co.sn.mml.pojo.tmsst.Tmsst;

public class TmkstkptsrkId implements java.io.Serializable { 

	//コード区分
	private String cdKbn;
	//コード
	private Tmsst code;
	//帳票種別
	private String thSbKbn;
	//バターンコード
	private String ptnCd;
	//行番号
	private Long seq;

	/** default constructor */
	public TmkstkptsrkId(){

	}

	/** full constructor */
	public TmkstkptsrkId(String cdKbn,Tmsst code,String thSbKbn
			,String ptnCd,Long seq){
		this.cdKbn = cdKbn;
		this.code = code;
		this.thSbKbn = thSbKbn;
		this.ptnCd = ptnCd;
		this.seq = seq;
	}

	//Property accessors
	public String getCdKbn(){
		return this.cdKbn;
	}

	public void setCdKbn(String cdKbn){
		this.cdKbn=cdKbn;
	}

	public Tmsst getCode(){
		return this.code;
	}

	public void setCode(Tmsst code){
		this.code=code;
	}

	public String getThSbKbn(){
		return this.thSbKbn;
	}

	public void setThSbKbn(String thSbKbn){
		this.thSbKbn=thSbKbn;
	}

	public String getPtnCd(){
		return this.ptnCd;
	}

	public void setPtnCd(String ptnCd){
		this.ptnCd=ptnCd;
	}

	public Long getSeq(){
		return this.seq;
	}

	public void setSeq(Long seq){
		this.seq=seq;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof TmkstkptsrkId))
			return false;

		TmkstkptsrkId castOther = (TmkstkptsrkId) other;

		return ((this.getCdKbn() ==  castOther.getCdKbn())
				||(this.getCdKbn()!=null && castOther.getCdKbn() !=null 
					&& castOther.getCdKbn() !=null 
					&& this.getCdKbn().equals(castOther.getCdKbn())))
			&& ((this.getCode() ==  castOther.getCode())
				||(this.getCode()!=null && castOther.getCode() !=null 
					&& castOther.getCode() !=null 
					&& this.getCode().equals(castOther.getCode())))
			&& ((this.getThSbKbn() ==  castOther.getThSbKbn())
				||(this.getThSbKbn()!=null && castOther.getThSbKbn() !=null 
					&& castOther.getThSbKbn() !=null 
					&& this.getThSbKbn().equals(castOther.getThSbKbn())))
			&& ((this.getPtnCd() ==  castOther.getPtnCd())
				||(this.getPtnCd()!=null && castOther.getPtnCd() !=null 
					&& castOther.getPtnCd() !=null 
					&& this.getPtnCd().equals(castOther.getPtnCd())))
			&& ((this.getSeq() ==  castOther.getSeq())
				||(this.getSeq()!=null && castOther.getSeq() !=null 
					&& castOther.getSeq() !=null 
					&& this.getSeq().equals(castOther.getSeq())))
;	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getCdKbn() == null ? 0 : this.getCdKbn().hashCode());
		result = 37 * result
				+ (getCode() == null ? 0 : this.getCode().hashCode());
		result = 37 * result
				+ (getThSbKbn() == null ? 0 : this.getThSbKbn().hashCode());
		result = 37 * result
				+ (getPtnCd() == null ? 0 : this.getPtnCd().hashCode());
		result = 37 * result
				+ (getSeq() == null ? 0 : this.getSeq().hashCode());
		return result;
	}

}